__author__ = 'dmitry'

COURSERA_AUTH_URI = 'https://accounts.coursera.org/oauth2/v1/auth'

CLIENT_ID = 'xv7T3GR7cD6GMAIVx2psAw'
SECRET_KEY = 'BgcszAAhmqIOuoFc6pIH-w'
CALLBACK_URI = 'http://hhcource.ilab.mipt.ru/auth/courseradone'

def generate_redirect_uri():
    return "{coursera_auth_uri}?" \
           "response_type=code&client_id={client_id}&state={state}&redirect_uri={redirect_uri}"\
        .format(coursera_auth_uri=COURSERA_AUTH_URI, client_id=CLIENT_ID, state="def", redirect_uri=CALLBACK_URI)

def get_user_access_token(request):
    return 'FIXME'